class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: D = None
        self.y: C = None
        self.q: E = None
        self.u: H = None
        self.p: C = None
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: G = None
        self.x: G = None
        self.r: B = None
        self.t: G = None
        self.q: H = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: G = None
        self.q: F = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: H = 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.x: B = None
        self.txt = txt

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

g = A("g")
b = B("b")
j = C("j")
f = D("f")
l = E("l")
k = F("k")
c = G("c")
m = H("m")
e = B("e")

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: G = None
        self.x: G = None
        self.r: B = None
        self.t: G = None
        self.q: H = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: G = None
        self.q: F = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: H = 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.x: B = None
        self.txt = txt

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

g = A("g")
b = B("b")
j = C("j")
f = D("f")
l = E("l")
k = F("k")
c = G("c")
m = H("m")
e = B("e")

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