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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: G = None
        self.z: C = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: D = None
        self.v: F = None
        self.x: H = None
        self.s: A = None
        self.w: F = None
        self.r: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: G = None
        self.z: C = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: D = None
        self.v: F = None
        self.x: H = None
        self.s: A = None
        self.w: F = None
        self.r: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.w: D = None
        self.txt = txt

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

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