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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: E = None
        self.w: F = None
        self.u: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: H = None
        self.v: F = None
        self.r: A = None
        self.z: F = None
        self.u: I = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: A = None
        self.z: C = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: F = None
        self.s: G = None
        self.z: D = None
        self.o: F = None
        self.y: D = None
        self.t: G = None
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: E = None
        self.w: F = None
        self.u: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: H = None
        self.v: F = None
        self.r: A = None
        self.z: F = None
        self.u: I = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: A = None
        self.z: C = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: F = None
        self.s: G = None
        self.z: D = None
        self.o: F = None
        self.y: D = None
        self.t: G = None
        self.p: C = None
        self.txt = txt

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

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