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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: B = None
        self.z: B = None
        self.o: H = None
        self.y: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: E = None
        self.s: B = None
        self.r: B = None
        self.z: D = None
        self.t: H = None
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: C = None
        self.o: B = None
        self.t: A = None
        self.z: A = None
        self.q: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: B = None
        self.z: B = None
        self.o: H = None
        self.y: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: E = None
        self.s: B = None
        self.r: B = None
        self.z: D = None
        self.t: H = None
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: C = None
        self.o: B = None
        self.t: A = None
        self.z: A = None
        self.q: A = None
        self.txt = txt

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

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