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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: E = None
        self.y: H = None
        self.u: E = None
        self.q: H = None
        self.w: G = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: A = None
        self.o: A = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: B = None
        self.x: A = None
        self.w: G = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: E = None
        self.z: D = None
        self.o: C = None
        self.x: A = None
        self.y: C = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: H = None
        self.o: B = None
        self.s: A = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

f.q = d
f.w = l
e.s = b
e.u = b
e.z = m
e.y = i
e.q = i
e.w = n
e.p = k
c.v = i
c.s = f
c.o = f
c.u = b
d.w = l
d.u = i
d.o = f
m.q = i
m.r = e
m.x = f
m.w = n
m.y = n
k.v = e
k.u = e
k.p = b
k.z = l
k.o = c
k.y = c
k.x = f
n.w = f
n.s = f
n.u = i
n.o = e
n.r = d
i.q = k
l.w = d
l.u = i
l.o = f
b.q = i
b.r = e
b.x = f
b.w = n
b.y = n
assert e.z.r.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: E = None
        self.y: H = None
        self.u: E = None
        self.q: H = None
        self.w: G = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: A = None
        self.o: A = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: B = None
        self.x: A = None
        self.w: G = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: E = None
        self.z: D = None
        self.o: C = None
        self.x: A = None
        self.y: C = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: H = None
        self.o: B = None
        self.s: A = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

f.q = d
f.w = l
e.s = b
e.u = b
e.z = m
e.y = i
e.q = i
e.w = n
e.p = k
c.v = i
c.s = f
c.o = f
c.u = b
d.w = l
d.u = i
d.o = f
m.q = i
m.r = e
m.x = f
m.w = n
m.y = n
k.v = e
k.u = e
k.p = b
k.z = l
k.o = c
k.y = c
k.x = f
n.w = f
n.s = f
n.u = i
n.o = e
n.r = d
i.q = k
l.w = d
l.u = i
l.o = f
b.q = i
b.r = e
b.x = f
b.w = n
b.y = n
assert e.z.r.u.r.txt == "e"