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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: E = None
        self.x: I = None
        self.z: I = None
        self.y: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: B = None
        self.o: E = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: F = None
        self.q: H = None
        self.t: E = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: G = None
        self.t: D = None
        self.r: I = None
        self.s: A = None
        self.z: C = None
        self.w: I = None
        self.y: A = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: A = None
        self.y: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: E = None
        self.x: I = None
        self.z: I = None
        self.y: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: B = None
        self.o: E = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: F = None
        self.q: H = None
        self.t: E = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: G = None
        self.t: D = None
        self.r: I = None
        self.s: A = None
        self.z: C = None
        self.w: I = None
        self.y: A = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: A = None
        self.y: G = None
        self.txt = txt

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

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