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

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: B = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: B = None
        self.t: E = None
        self.txt = txt

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

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

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