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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: A = None
        self.o: C = None
        self.w: A = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: A = None
        self.o: C = None
        self.w: A = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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