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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: H = None
        self.x: D = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: D = None
        self.w: G = None
        self.v: A = None
        self.o: B = None
        self.p: C = None
        self.r: B = None
        self.z: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: G = None
        self.v: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: H = None
        self.x: D = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: D = None
        self.w: G = None
        self.v: A = None
        self.o: B = None
        self.p: C = None
        self.r: B = None
        self.z: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: G = None
        self.v: G = None
        self.txt = txt

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

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