class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: B = None
        self.w: D = None
        self.p: F = None
        self.v: E = None
        self.r: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: D = None
        self.p: B = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: F = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: A = None
        self.o: A = None
        self.v: A = None
        self.p: C = None
        self.q: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: D = None
        self.p: B = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: F = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: A = None
        self.o: A = None
        self.v: A = None
        self.p: C = None
        self.q: E = None
        self.txt = txt

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

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