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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: E = None
        self.w: A = None
        self.txt = txt

g = A("g")
h = B("h")
j = C("j")
c = D("c")
f = E("f")
b = F("b")
e = A("e")
a = F("a")
d = A("d")
k = A("k")

g.s = j
g.o = j
g.t = c
h.o = d
h.w = a
j.s = b
j.u = a
j.t = c
j.z = f
j.y = h
j.r = g
c.p = j
c.s = h
f.s = d
b.z = e
b.x = f
b.w = k
e.s = j
e.o = j
e.t = c
a.z = d
a.x = f
a.w = g
d.s = j
d.o = j
d.t = c
k.s = j
k.o = j
k.t = c
assert e.t.p.s.x.s.t.p.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: C = None
        self.t: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: E = None
        self.w: A = None
        self.txt = txt

g = A("g")
h = B("h")
j = C("j")
c = D("c")
f = E("f")
b = F("b")
e = A("e")
a = F("a")
d = A("d")
k = A("k")

g.s = j
g.o = j
g.t = c
h.o = d
h.w = a
j.s = b
j.u = a
j.t = c
j.z = f
j.y = h
j.r = g
c.p = j
c.s = h
f.s = d
b.z = e
b.x = f
b.w = k
e.s = j
e.o = j
e.t = c
a.z = d
a.x = f
a.w = g
d.s = j
d.o = j
d.t = c
k.s = j
k.o = j
k.t = c
assert e.t.p.s.x.s.t.p.s.txt == "b"