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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: F = None
        self.z: F = None
        self.s: C = None
        self.r: D = None
        self.o: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: F = None
        self.z: F = None
        self.s: C = None
        self.r: D = None
        self.o: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

g.s = k
g.t = k
g.o = h
h.t = e
j.t = k
j.q = d
j.z = d
j.s = a
j.o = a
j.r = n
m.y = h
k.z = d
k.u = a
k.r = n
d.r = g
d.s = g
d.o = g
d.w = n
d.u = h
a.t = k
a.q = d
a.z = d
a.s = j
a.o = j
a.r = n
n.y = h
e.s = k
e.t = k
e.o = h
assert d.u.t.s.r.txt == "n"