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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: E = None
        self.q: F = None
        self.o: E = None
        self.y: F = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: B = None
        self.q: E = None
        self.t: H = None
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: F = None
        self.p: F = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: B = None
        self.x: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: E = None
        self.q: F = None
        self.o: E = None
        self.y: F = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: B = None
        self.q: E = None
        self.t: H = None
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: F = None
        self.p: F = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: B = None
        self.x: B = None
        self.txt = txt

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

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

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

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