class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: D = None
        self.q: A = None
        self.z: A = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: E = None
        self.z: G = None
        self.r: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: B = None
        self.z: G = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: E = None
        self.txt = txt

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

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

b = A("b")
i = B("i")
g = C("g")
j = D("j")
a = E("a")
h = F("h")
l = G("l")
c = H("c")
n = D("n")
f = C("f")

b.v = g
i.y = a
i.v = n
i.q = b
i.z = b
i.r = l
g.y = a
g.t = a
g.z = l
g.r = f
j.o = i
j.p = l
j.t = l
a.p = h
a.q = i
a.w = i
a.z = l
h.v = c
h.w = a
l.w = c
l.x = b
l.t = n
l.r = n
l.u = a
l.v = a
l.s = i
c.v = h
n.o = i
n.p = l
n.t = l
f.y = a
f.t = a
f.z = l
f.r = g
assert g.z.x.v.z.s.q.v.z.u.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: D = None
        self.q: A = None
        self.z: A = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: E = None
        self.z: G = None
        self.r: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: B = None
        self.z: G = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: E = None
        self.txt = txt

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

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

b = A("b")
i = B("i")
g = C("g")
j = D("j")
a = E("a")
h = F("h")
l = G("l")
c = H("c")
n = D("n")
f = C("f")

b.v = g
i.y = a
i.v = n
i.q = b
i.z = b
i.r = l
g.y = a
g.t = a
g.z = l
g.r = f
j.o = i
j.p = l
j.t = l
a.p = h
a.q = i
a.w = i
a.z = l
h.v = c
h.w = a
l.w = c
l.x = b
l.t = n
l.r = n
l.u = a
l.v = a
l.s = i
c.v = h
n.o = i
n.p = l
n.t = l
f.y = a
f.t = a
f.z = l
f.r = g
assert g.z.x.v.z.s.q.v.z.u.z.txt == "l"