class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: C = None
        self.x: F = None
        self.r: G = None
        self.o: F = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: F = None
        self.txt = txt

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

i.u = l
i.p = d
l.r = g
l.v = e
l.y = h
l.p = h
l.w = c
g.x = e
g.w = e
g.y = e
g.s = i
g.r = i
c.r = g
c.p = i
c.y = h
c.w = b
c.u = d
h.t = d
h.r = d
h.v = d
h.s = g
h.x = e
h.o = e
e.y = c
d.r = e
d.t = e
b.r = g
b.p = i
b.y = h
b.w = c
b.u = d
k.r = g
k.v = e
k.y = h
k.p = h
k.w = c
assert g.r.u.w.w.y.o.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: C = None
        self.x: F = None
        self.r: G = None
        self.o: F = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: F = None
        self.txt = txt

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

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