class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: A = None
        self.x: B = None
        self.p: B = None
        self.q: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: A = None
        self.p: B = None
        self.o: E = None
        self.s: B = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: A = None
        self.p: B = None
        self.o: E = None
        self.s: B = None
        self.y: C = None
        self.txt = txt

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

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

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

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