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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: F = None
        self.u: A = None
        self.v: B = None
        self.t: B = None
        self.y: A = None
        self.w: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: A = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: F = None
        self.u: A = None
        self.v: B = None
        self.t: B = None
        self.y: A = None
        self.w: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: A = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: C = None
        self.txt = txt

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

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

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

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