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

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

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

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

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

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

i = A("i")
m = B("m")
c = C("c")
g = D("g")
l = E("l")
n = F("n")
k = D("k")
b = F("b")

i.x = n
i.v = m
m.t = l
m.z = n
m.v = g
m.s = c
c.o = n
c.p = i
g.y = m
g.u = m
g.o = i
g.r = i
g.s = l
g.t = b
l.o = c
l.z = i
l.q = n
l.r = g
n.t = k
n.o = k
n.s = c
n.p = c
k.y = m
k.u = m
k.o = i
k.r = i
k.s = l
k.t = n
b.t = k
b.o = k
b.s = c
b.p = c
assert i.x.o.t.s.o.s.p.v.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

i = A("i")
m = B("m")
c = C("c")
g = D("g")
l = E("l")
n = F("n")
k = D("k")
b = F("b")

i.x = n
i.v = m
m.t = l
m.z = n
m.v = g
m.s = c
c.o = n
c.p = i
g.y = m
g.u = m
g.o = i
g.r = i
g.s = l
g.t = b
l.o = c
l.z = i
l.q = n
l.r = g
n.t = k
n.o = k
n.s = c
n.p = c
k.y = m
k.u = m
k.o = i
k.r = i
k.s = l
k.t = n
b.t = k
b.o = k
b.s = c
b.p = c
assert i.x.o.t.s.o.s.p.v.txt == "m"