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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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