class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: H = None
        self.q: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: E = None
        self.z: B = None
        self.r: G = None
        self.s: E = None
        self.y: F = None
        self.v: G = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: E = None
        self.o: E = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: E = None
        self.z: B = None
        self.r: G = None
        self.s: E = None
        self.y: F = None
        self.v: G = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: E = None
        self.o: E = None
        self.t: A = None
        self.txt = txt

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

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

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