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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: E = None
        self.q: F = None
        self.p: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: D = None
        self.x: H = None
        self.t: H = None
        self.q: F = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: B = None
        self.r: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: D = None
        self.p: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: E = None
        self.q: F = None
        self.p: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: D = None
        self.x: H = None
        self.t: H = None
        self.q: F = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: B = None
        self.r: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: D = None
        self.p: G = None
        self.txt = txt

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

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