class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: D = None
        self.p: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: B = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: A = None
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: H = None
        self.v: H = None
        self.txt = txt

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

j.x = k
j.w = a
j.p = h
c.v = f
c.w = f
c.s = e
c.o = e
c.z = j
c.y = m
h.y = m
a.q = l
a.t = l
a.o = l
a.r = j
a.w = j
a.y = f
a.z = c
a.v = k
l.v = a
l.y = e
l.u = c
k.x = j
k.p = j
k.z = a
f.q = c
f.o = l
b.x = m
b.y = m
b.v = m
m.x = b
m.y = b
m.v = b
e.v = f
e.w = f
e.s = c
e.o = c
e.z = j
e.y = m
assert f.q.y.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: D = None
        self.p: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: B = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: A = None
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: H = None
        self.v: H = None
        self.txt = txt

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

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