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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: G = None
        self.u: D = None
        self.r: G = None
        self.z: D = None
        self.x: G = None
        self.y: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: E = None
        self.z: F = None
        self.t: G = None
        self.s: E = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: E = None
        self.s: A = None
        self.o: C = None
        self.w: G = None
        self.u: G = None
        self.y: C = None
        self.txt = txt

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

l = A("l")
f = B("f")
e = C("e")
i = D("i")
g = E("g")
h = F("h")
k = G("k")
d = G("d")
a = E("a")

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: G = None
        self.u: D = None
        self.r: G = None
        self.z: D = None
        self.x: G = None
        self.y: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: E = None
        self.z: F = None
        self.t: G = None
        self.s: E = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: E = None
        self.s: A = None
        self.o: C = None
        self.w: G = None
        self.u: G = None
        self.y: C = None
        self.txt = txt

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

l = A("l")
f = B("f")
e = C("e")
i = D("i")
g = E("g")
h = F("h")
k = G("k")
d = G("d")
a = E("a")

l.y = e
l.o = e
f.o = l
f.r = i
f.p = i
f.w = i
f.y = e
f.u = a
f.v = d
e.q = h
e.o = k
e.r = k
e.u = i
e.z = i
e.x = d
e.y = l
i.w = e
g.x = f
g.y = a
g.s = a
g.z = h
g.p = h
g.t = k
h.z = e
h.o = e
h.y = e
h.v = a
h.s = l
h.w = d
h.u = k
k.t = i
k.p = a
d.t = i
d.p = a
a.x = f
a.y = g
a.s = g
a.z = h
a.p = h
a.t = d
assert l.y.q.s.o.y.txt == "l"