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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: G = None
        self.u: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: H = None
        self.q: J = None
        self.t: A = None
        self.s: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: B = None
        self.txt = txt

g = A("g")
k = B("k")
e = C("e")
h = D("h")
n = E("n")
b = F("b")
m = G("m")
a = H("a")
c = I("c")
l = J("l")

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: G = None
        self.u: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: H = None
        self.q: J = None
        self.t: A = None
        self.s: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: B = None
        self.txt = txt

g = A("g")
k = B("k")
e = C("e")
h = D("h")
n = E("n")
b = F("b")
m = G("m")
a = H("a")
c = I("c")
l = J("l")

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