class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: G = None
        self.w: B = None
        self.y: G = None
        self.p: F = None
        self.z: C = None
        self.u: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: B = None
        self.z: B = None
        self.y: G = None
        self.x: H = None
        self.u: H = None
        self.t: G = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: D = None
        self.q: A = None
        self.u: B = None
        self.x: H = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: A = None
        self.p: C = None
        self.txt = txt

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

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

l = A("l")
n = B("n")
k = C("k")
j = D("j")
b = E("b")
d = F("d")
c = G("c")
g = H("g")

l.x = c
l.t = c
l.y = c
l.u = c
l.w = n
l.p = d
l.z = k
n.x = k
n.w = k
n.s = l
n.q = c
n.u = b
k.y = j
j.r = c
j.y = c
j.t = c
j.v = n
j.z = n
j.x = g
j.u = g
j.q = d
b.o = k
b.y = j
b.q = l
b.u = n
b.x = g
b.p = c
d.u = j
d.r = l
d.p = k
c.o = j
c.r = n
c.s = b
g.x = k
g.o = l
assert j.y.r.q.r.u.p.r.txt == "
class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: G = None
        self.w: B = None
        self.y: G = None
        self.p: F = None
        self.z: C = None
        self.u: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: B = None
        self.z: B = None
        self.y: G = None
        self.x: H = None
        self.u: H = None
        self.t: G = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: D = None
        self.q: A = None
        self.u: B = None
        self.x: H = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: A = None
        self.p: C = None
        self.txt = txt

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

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

l = A("l")
n = B("n")
k = C("k")
j = D("j")
b = E("b")
d = F("d")
c = G("c")
g = H("g")

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