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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: F = None
        self.w: F = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: F = None
        self.w: F = None
        self.y: A = None
        self.txt = txt

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

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