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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: C = None
        self.q: H = None
        self.t: H = None
        self.w: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: A = None
        self.u: E = None
        self.x: B = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: A = None
        self.x: A = None
        self.q: E = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: A = None
        self.p: D = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: C = None
        self.q: H = None
        self.t: H = None
        self.w: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: A = None
        self.u: E = None
        self.x: B = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: A = None
        self.x: A = None
        self.q: E = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: A = None
        self.p: D = None
        self.z: A = None
        self.txt = txt

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

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