class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: B = None
        self.w: H = None
        self.y: H = None
        self.o: B = None
        self.x: B = None
        self.q: F = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: F = None
        self.r: D = None
        self.t: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: B = None
        self.w: H = None
        self.y: H = None
        self.o: B = None
        self.x: B = None
        self.q: F = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: F = None
        self.r: D = None
        self.t: E = None
        self.txt = txt

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

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