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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: H = None
        self.r: A = None
        self.s: A = None
        self.p: E = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: B = None
        self.u: B = None
        self.t: F = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: E = None
        self.x: H = None
        self.s: D = None
        self.t: E = None
        self.p: C = None
        self.w: A = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: H = None
        self.r: A = None
        self.s: A = None
        self.p: E = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: B = None
        self.u: B = None
        self.t: F = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: E = None
        self.x: H = None
        self.s: D = None
        self.t: E = None
        self.p: C = None
        self.w: A = None
        self.o: E = None
        self.txt = txt

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

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

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

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