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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: G = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: A = None
        self.z: C = None
        self.v: G = None
        self.o: H = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: B = None
        self.z: D = None
        self.y: D = None
        self.x: C = None
        self.r: D = None
        self.t: B = None
        self.q: E = None
        self.txt = txt

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

e.q = h
e.r = h
e.z = h
e.t = f
e.x = f
e.s = m
c.r = n
h.v = l
k.w = n
k.o = n
k.p = f
m.w = k
l.p = e
l.x = e
l.z = h
l.v = f
l.o = n
l.r = m
f.s = h
f.q = h
n.o = m
n.q = m
n.w = c
n.t = c
n.z = k
n.y = k
n.r = k
n.x = h
assert c.r.y.o.z.p.txt == "
class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: C = None
        self.t: G = None
        self.s: E = None
        self.x: G = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: G = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: A = None
        self.z: C = None
        self.v: G = None
        self.o: H = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: B = None
        self.z: D = None
        self.y: D = None
        self.x: C = None
        self.r: D = None
        self.t: B = None
        self.q: E = None
        self.txt = txt

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

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