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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: B = None
        self.u: B = None
        self.txt = txt

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

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

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

m = A("m")
c = B("c")
d = C("d")
f = D("f")
i = E("i")
j = F("j")
a = G("a")
k = H("k")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: B = None
        self.u: B = None
        self.txt = txt

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

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

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

m = A("m")
c = B("c")
d = C("d")
f = D("f")
i = E("i")
j = F("j")
a = G("a")
k = H("k")

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