class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: B = None
        self.y: B = None
        self.p: A = None
        self.z: C = None
        self.q: E = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: E = None
        self.o: A = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: C = None
        self.z: B = None
        self.s: B = None
        self.r: E = None
        self.y: E = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: D = None
        self.t: C = None
        self.v: C = None
        self.r: A = None
        self.w: G = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: D = None
        self.txt = txt

b = A("b")
j = B("j")
a = C("a")
g = D("g")
l = E("l")
f = F("f")
i = G("i")
m = A("m")
c = E("c")

b.u = a
b.z = a
b.x = j
b.y = j
b.p = m
b.q = l
b.v = g
j.y = g
j.z = c
j.o = b
j.r = a
a.u = j
g.p = a
g.v = a
g.q = a
g.z = j
g.s = j
g.r = c
g.y = l
l.o = g
f.u = c
f.s = c
f.p = g
f.t = a
f.v = a
f.r = m
f.w = i
i.z = l
i.q = g
m.u = a
m.z = a
m.x = j
m.y = j
m.p = b
m.q = c
m.v = g
c.o = g
assert i.q.z.y.y.o.p.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: B = None
        self.y: B = None
        self.p: A = None
        self.z: C = None
        self.q: E = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: E = None
        self.o: A = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: C = None
        self.z: B = None
        self.s: B = None
        self.r: E = None
        self.y: E = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: D = None
        self.t: C = None
        self.v: C = None
        self.r: A = None
        self.w: G = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: D = None
        self.txt = txt

b = A("b")
j = B("j")
a = C("a")
g = D("g")
l = E("l")
f = F("f")
i = G("i")
m = A("m")
c = E("c")

b.u = a
b.z = a
b.x = j
b.y = j
b.p = m
b.q = l
b.v = g
j.y = g
j.z = c
j.o = b
j.r = a
a.u = j
g.p = a
g.v = a
g.q = a
g.z = j
g.s = j
g.r = c
g.y = l
l.o = g
f.u = c
f.s = c
f.p = g
f.t = a
f.v = a
f.r = m
f.w = i
i.z = l
i.q = g
m.u = a
m.z = a
m.x = j
m.y = j
m.p = b
m.q = c
m.v = g
c.o = g
assert i.q.z.y.y.o.p.txt == "a"