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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: I = None
        self.w: I = None
        self.r: B = None
        self.u: I = None
        self.p: H = None
        self.y: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: D = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: I = None
        self.w: I = None
        self.r: B = None
        self.u: I = None
        self.p: H = None
        self.y: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: D = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: G = None
        self.txt = txt

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

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

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