class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: B = None
        self.p: E = None
        self.o: B = None
        self.z: E = None
        self.x: D = None
        self.v: H = None
        self.y: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: D = None
        self.t: C = None
        self.o: H = None
        self.p: D = None
        self.z: B = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: D = None
        self.t: C = None
        self.o: H = None
        self.p: D = None
        self.z: B = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: G = None
        self.txt = txt

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

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