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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: B = None
        self.z: A = None
        self.v: C = None
        self.txt = txt

l = A("l")
c = B("c")
b = C("b")
d = D("d")
f = E("f")
h = F("h")
g = A("g")
e = D("e")
j = C("j")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: B = None
        self.z: A = None
        self.v: C = None
        self.txt = txt

l = A("l")
c = B("c")
b = C("b")
d = D("d")
f = E("f")
h = F("h")
g = A("g")
e = D("e")
j = C("j")

l.q = d
l.p = d
l.y = c
l.z = c
l.o = f
c.r = e
c.x = e
c.w = l
c.q = l
b.u = d
b.s = g
b.w = c
b.z = l
d.u = c
d.v = g
d.s = e
d.w = e
d.x = h
f.x = h
f.z = b
h.y = l
h.z = l
h.u = c
h.v = b
g.q = e
g.p = d
g.y = c
g.z = c
g.o = f
e.u = c
e.v = l
e.s = d
e.w = d
e.x = h
j.u = e
j.s = l
j.z = l
j.w = c
assert c.r.v.q.x.y.o.x.z.txt == "l"