class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: E = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: D = None
        self.s: D = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: C = None
        self.p: D = None
        self.z: D = None
        self.o: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: B = None
        self.w: F = None
        self.x: F = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: A = None
        self.w: F = None
        self.u: D = None
        self.o: A = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: D = None
        self.s: D = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: C = None
        self.p: D = None
        self.z: D = None
        self.o: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: B = None
        self.w: F = None
        self.x: F = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: A = None
        self.w: F = None
        self.u: D = None
        self.o: A = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: A = None
        self.txt = txt

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

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