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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: E = None
        self.u: A = None
        self.v: C = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: E = None
        self.z: F = None
        self.y: H = None
        self.s: A = None
        self.q: F = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: C = None
        self.z: A = None
        self.y: A = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: D = None
        self.u: C = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: H = None
        self.t: H = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: C = None
        self.q: A = None
        self.r: C = None
        self.o: H = None
        self.txt = txt

f = A("f")
l = B("l")
a = C("a")
h = D("h")
n = E("n")
c = F("c")
i = G("i")
j = H("j")
g = A("g")
k = H("k")

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: E = None
        self.u: A = None
        self.v: C = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: E = None
        self.z: F = None
        self.y: H = None
        self.s: A = None
        self.q: F = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: C = None
        self.z: A = None
        self.y: A = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: D = None
        self.u: C = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: H = None
        self.t: H = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: C = None
        self.q: A = None
        self.r: C = None
        self.o: H = None
        self.txt = txt

f = A("f")
l = B("l")
a = C("a")
h = D("h")
n = E("n")
c = F("c")
i = G("i")
j = H("j")
g = A("g")
k = H("k")

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