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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: F = None
        self.o: D = None
        self.q: I = None
        self.p: I = None
        self.x: D = None
        self.u: F = None
        self.s: D = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: I = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: I = None
        self.r: F = None
        self.w: H = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: B = None
        self.w: E = None
        self.s: H = None
        self.q: A = None
        self.p: I = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: C = None
        self.z: D = None
        self.p: I = None
        self.s: B = None
        self.txt = txt

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

g = A("g")
a = B("a")
k = C("k")
j = D("j")
i = E("i")
h = F("h")
n = G("n")
l = H("l")
m = I("m")
e = A("e")

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: F = None
        self.o: D = None
        self.q: I = None
        self.p: I = None
        self.x: D = None
        self.u: F = None
        self.s: D = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: I = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: I = None
        self.r: F = None
        self.w: H = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: B = None
        self.w: E = None
        self.s: H = None
        self.q: A = None
        self.p: I = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: C = None
        self.z: D = None
        self.p: I = None
        self.s: B = None
        self.txt = txt

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

g = A("g")
a = B("a")
k = C("k")
j = D("j")
i = E("i")
h = F("h")
n = G("n")
l = H("l")
m = I("m")
e = A("e")

g.t = j
g.s = a
g.p = a
g.w = h
g.z = i
g.q = i
a.t = l
a.z = h
a.u = h
a.o = j
a.x = j
a.s = j
a.q = m
a.p = m
a.r = k
k.v = m
k.x = h
k.w = a
j.w = h
j.p = m
j.t = i
i.s = l
i.w = l
i.q = l
i.x = m
i.r = h
h.v = n
h.t = a
h.o = a
h.w = i
h.s = l
h.q = g
h.p = m
n.t = j
n.r = j
l.r = m
l.p = m
l.x = k
l.z = j
l.s = a
m.o = k
m.p = i
m.r = i
e.t = j
e.s = a
e.p = a
e.w = h
e.z = i
e.q = i
assert e.t.t.x.p.r.w.r.q.z.txt == "i"