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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: G = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: A = None
        self.t: G = None
        self.x: B = None
        self.w: G = None
        self.txt = txt

b = A("b")
e = B("e")
l = C("l")
a = D("a")
k = E("k")
h = F("h")
n = G("n")
d = H("d")
j = G("j")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: G = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: A = None
        self.t: G = None
        self.x: B = None
        self.w: G = None
        self.txt = txt

b = A("b")
e = B("e")
l = C("l")
a = D("a")
k = E("k")
h = F("h")
n = G("n")
d = H("d")
j = G("j")

b.y = a
e.z = l
e.o = k
l.r = j
l.t = b
l.z = b
l.o = d
l.u = k
l.v = k
l.s = h
a.t = j
a.w = l
k.x = l
h.s = d
n.w = a
n.p = a
n.q = j
n.o = j
d.y = e
d.x = e
d.z = b
d.t = n
d.w = n
j.w = a
j.p = a
j.q = n
j.o = n
assert b.y.w.z.y.w.v.x.txt == "l"