class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: B = None
        self.z: F = None
        self.p: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: B = None
        self.q: B = None
        self.y: C = None
        self.t: B = None
        self.u: D = None
        self.txt = txt

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

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

e = A("e")
j = B("j")
a = C("a")
m = D("m")
k = E("k")
f = F("f")
n = D("n")

e.y = f
e.z = f
e.r = j
e.p = j
j.s = e
j.w = a
a.t = e
a.s = k
a.v = k
a.u = k
a.z = j
a.w = f
m.p = n
m.u = n
m.z = j
m.q = j
m.t = j
m.y = a
k.t = e
f.u = a
f.w = k
f.o = k
n.p = m
n.u = m
n.z = j
n.q = j
n.t = j
n.y = a
assert n.p.q.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: B = None
        self.z: F = None
        self.p: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: B = None
        self.q: B = None
        self.y: C = None
        self.t: B = None
        self.u: D = None
        self.txt = txt

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

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

e = A("e")
j = B("j")
a = C("a")
m = D("m")
k = E("k")
f = F("f")
n = D("n")

e.y = f
e.z = f
e.r = j
e.p = j
j.s = e
j.w = a
a.t = e
a.s = k
a.v = k
a.u = k
a.z = j
a.w = f
m.p = n
m.u = n
m.z = j
m.q = j
m.t = j
m.y = a
k.t = e
f.u = a
f.w = k
f.o = k
n.p = m
n.u = m
n.z = j
n.q = j
n.t = j
n.y = a
assert n.p.q.s.y.txt == "f"