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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: D = None
        self.z: G = None
        self.r: E = None
        self.s: G = None
        self.v: E = None
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: D = None
        self.z: G = None
        self.r: E = None
        self.s: G = None
        self.v: E = None
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

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