class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: A = None
        self.v: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: D = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: D = None
        self.x: D = None
        self.txt = txt

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

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

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