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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: H = None
        self.o: D = None
        self.s: E = None
        self.z: I = None
        self.y: G = None
        self.p: B = None
        self.w: B = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: H = None
        self.w: D = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: G = None
        self.o: E = None
        self.z: D = None
        self.t: B = None
        self.r: D = None
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: I = None
        self.x: C = None
        self.o: E = None
        self.w: G = None
        self.v: G = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: E = None
        self.txt = txt

b = A("b")
c = B("c")
k = C("k")
i = D("i")
l = E("l")
e = F("e")
a = G("a")
m = H("m")
d = I("d")

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: H = None
        self.o: D = None
        self.s: E = None
        self.z: I = None
        self.y: G = None
        self.p: B = None
        self.w: B = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: H = None
        self.w: D = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: G = None
        self.o: E = None
        self.z: D = None
        self.t: B = None
        self.r: D = None
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: I = None
        self.x: C = None
        self.o: E = None
        self.w: G = None
        self.v: G = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: E = None
        self.txt = txt

b = A("b")
c = B("c")
k = C("k")
i = D("i")
l = E("l")
e = F("e")
a = G("a")
m = H("m")
d = I("d")

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