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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: G = None
        self.r: E = None
        self.q: F = None
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: D = None
        self.w: D = None
        self.s: D = None
        self.q: E = None
        self.v: D = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: B = None
        self.s: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: G = None
        self.r: E = None
        self.q: F = None
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: D = None
        self.w: D = None
        self.s: D = None
        self.q: E = None
        self.v: D = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: B = None
        self.s: A = None
        self.txt = txt

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

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

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