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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: D = None
        self.z: D = None
        self.y: B = None
        self.x: C = None
        self.q: E = None
        self.u: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: D = None
        self.z: D = None
        self.y: B = None
        self.x: C = None
        self.q: E = None
        self.u: H = None
        self.txt = txt

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

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

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

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