class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: I = None
        self.r: B = None
        self.u: G = None
        self.t: I = None
        self.y: G = None
        self.s: C = None
        self.z: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: G = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: C = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: B = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: A = None
        self.v: D = None
        self.s: I = None
        self.o: D = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: G = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: C = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: B = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: A = None
        self.v: D = None
        self.s: I = None
        self.o: D = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: B = None
        self.txt = txt

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

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

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