class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: C = None
        self.r: D = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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