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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: C = None
        self.o: A = None
        self.y: G = None
        self.u: D = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: A = None
        self.z: A = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: C = None
        self.x: D = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: C = None
        self.t: C = None
        self.z: C = None
        self.q: E = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: F = None
        self.w: D = None
        self.s: E = None
        self.v: A = None
        self.txt = txt

e = A("e")
j = B("j")
d = C("d")
f = D("f")
n = E("n")
h = F("h")
l = G("l")

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: C = None
        self.o: A = None
        self.y: G = None
        self.u: D = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: A = None
        self.z: A = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: C = None
        self.x: D = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: C = None
        self.t: C = None
        self.z: C = None
        self.q: E = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: F = None
        self.w: D = None
        self.s: E = None
        self.v: A = None
        self.txt = txt

e = A("e")
j = B("j")
d = C("d")
f = D("f")
n = E("n")
h = F("h")
l = G("l")

e.o = f
e.y = f
j.r = e
j.o = e
j.s = d
j.y = l
j.u = f
j.v = n
d.v = l
d.y = l
d.r = e
d.z = e
f.y = d
f.o = j
f.v = j
f.p = j
f.s = h
f.t = e
n.p = j
n.t = d
n.o = d
n.x = f
h.o = f
h.w = d
h.t = d
h.z = d
h.q = n
h.x = e
l.x = f
l.w = f
l.y = h
l.s = n
l.v = e
assert e.y.y.y.y.txt == "h"