class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: G = None
        self.u: H = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: C = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: E = None
        self.u: F = None
        self.y: G = None
        self.z: C = None
        self.s: F = None
        self.p: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

m = A("m")
j = B("j")
l = C("l")
k = D("k")
c = E("c")
h = F("h")
f = G("f")
n = H("n")
g = C("g")

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: C = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: E = None
        self.u: F = None
        self.y: G = None
        self.z: C = None
        self.s: F = None
        self.p: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

m = A("m")
j = B("j")
l = C("l")
k = D("k")
c = E("c")
h = F("h")
f = G("f")
n = H("n")
g = C("g")

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