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

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: H = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: H = None
        self.p: F = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: E = None
        self.r: G = None
        self.p: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: H = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: H = None
        self.p: F = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: E = None
        self.r: G = None
        self.p: G = None
        self.txt = txt

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

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