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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: H = None
        self.v: C = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: E = None
        self.r: A = None
        self.p: E = None
        self.s: D = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: B = None
        self.y: G = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: H = None
        self.v: E = None
        self.t: D = None
        self.r: D = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: C = None
        self.s: F = None
        self.u: F = None
        self.q: H = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: A = None
        self.r: F = None
        self.y: F = None
        self.x: G = None
        self.w: B = None
        self.txt = txt

l = A("l")
e = B("e")
d = C("d")
j = D("j")
k = E("k")
c = F("c")
n = G("n")
f = H("f")

l.y = j
e.q = f
e.x = f
e.v = d
e.y = n
d.y = e
d.o = k
d.p = k
d.x = k
d.r = l
d.s = j
j.y = e
k.t = c
k.s = e
k.y = n
k.o = j
c.u = n
c.p = f
c.v = k
c.t = j
c.r = j
c.s = j
n.o = j
n.r = j
n.v = d
n.s = c
n.u = c
n.q = f
f.v = k
f.u = l
f.r = c
f.y = c
f.x = n
f.w = e
assert c.p.v.y.q.u.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: H = None
        self.v: C = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: E = None
        self.r: A = None
        self.p: E = None
        self.s: D = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: B = None
        self.y: G = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: H = None
        self.v: E = None
        self.t: D = None
        self.r: D = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: C = None
        self.s: F = None
        self.u: F = None
        self.q: H = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: A = None
        self.r: F = None
        self.y: F = None
        self.x: G = None
        self.w: B = None
        self.txt = txt

l = A("l")
e = B("e")
d = C("d")
j = D("j")
k = E("k")
c = F("c")
n = G("n")
f = H("f")

l.y = j
e.q = f
e.x = f
e.v = d
e.y = n
d.y = e
d.o = k
d.p = k
d.x = k
d.r = l
d.s = j
j.y = e
k.t = c
k.s = e
k.y = n
k.o = j
c.u = n
c.p = f
c.v = k
c.t = j
c.r = j
c.s = j
n.o = j
n.r = j
n.v = d
n.s = c
n.u = c
n.q = f
f.v = k
f.u = l
f.r = c
f.y = c
f.x = n
f.w = e
assert c.p.v.y.q.u.y.y.txt == "e"