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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: H = None
        self.y: E = None
        self.v: D = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: F = None
        self.y: H = None
        self.o: B = None
        self.z: H = None
        self.r: C = None
        self.t: B = None
        self.w: B = None
        self.txt = txt

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

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

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

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

b = A("b")
d = B("d")
l = C("l")
j = D("j")
k = E("k")
g = F("g")
h = G("h")
i = H("i")
m = G("m")

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: H = None
        self.y: E = None
        self.v: D = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: F = None
        self.y: H = None
        self.o: B = None
        self.z: H = None
        self.r: C = None
        self.t: B = None
        self.w: B = None
        self.txt = txt

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

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

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

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

b = A("b")
d = B("d")
l = C("l")
j = D("j")
k = E("k")
g = F("g")
h = G("h")
i = H("i")
m = G("m")

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