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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: A = None
        self.y: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: A = None
        self.w: C = None
        self.x: A = None
        self.o: E = None
        self.s: F = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: A = None
        self.y: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: A = None
        self.w: C = None
        self.x: A = None
        self.o: E = None
        self.s: F = None
        self.p: A = None
        self.txt = txt

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

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

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