class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: I = None
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: I = None
        self.s: E = None
        self.u: B = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: I = None
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: I = None
        self.s: E = None
        self.u: B = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

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

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