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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: C = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: B = None
        self.o: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: B = None
        self.txt = txt

g = A("g")
n = B("n")
h = C("h")
l = D("l")
k = E("k")
a = F("a")
i = C("i")
b = B("b")
e = D("e")

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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: C = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: B = None
        self.o: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: B = None
        self.txt = txt

g = A("g")
n = B("n")
h = C("h")
l = D("l")
k = E("k")
a = F("a")
i = C("i")
b = B("b")
e = D("e")

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