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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: F = None
        self.u: E = None
        self.w: H = None
        self.r: F = None
        self.y: E = None
        self.x: I = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: F = None
        self.v: B = None
        self.y: I = None
        self.q: A = None
        self.x: B = None
        self.z: F = None
        self.w: I = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: A = None
        self.x: A = None
        self.w: H = None
        self.z: C = None
        self.y: C = None
        self.p: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: F = None
        self.u: E = None
        self.w: H = None
        self.r: F = None
        self.y: E = None
        self.x: I = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: F = None
        self.v: B = None
        self.y: I = None
        self.q: A = None
        self.x: B = None
        self.z: F = None
        self.w: I = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: A = None
        self.x: A = None
        self.w: H = None
        self.z: C = None
        self.y: C = None
        self.p: H = None
        self.txt = txt

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

c.u = j
c.t = k
c.w = a
l.t = d
d.q = h
d.v = j
d.r = j
d.u = g
d.y = g
d.w = e
d.x = a
d.t = c
d.o = c
k.z = h
k.p = e
k.t = d
k.x = l
g.u = c
g.r = d
g.o = l
g.w = h
g.y = e
g.t = k
j.z = d
j.p = d
j.t = d
j.w = a
h.p = j
h.r = l
e.r = j
e.s = j
e.z = j
e.t = j
e.v = l
e.x = l
e.y = a
e.w = a
e.q = c
a.r = g
a.t = c
a.x = c
a.w = e
a.p = e
a.z = d
a.y = d
assert l.t.x.p.q.u.p.q.p.txt == "j"