class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: F = None
        self.v: E = None
        self.z: D = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: G = None
        self.w: A = None
        self.t: F = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: A = None
        self.r: H = None
        self.w: H = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: H = None
        self.t: A = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: D = None
        self.t: A = None
        self.r: D = None
        self.p: E = None
        self.z: E = None
        self.y: C = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: E = None
        self.u: E = None
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: G = None
        self.w: A = None
        self.t: F = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: A = None
        self.r: H = None
        self.w: H = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: H = None
        self.t: A = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: D = None
        self.t: A = None
        self.r: D = None
        self.p: E = None
        self.z: E = None
        self.y: C = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: E = None
        self.u: E = None
        self.w: E = None
        self.txt = txt

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

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