class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: D = None
        self.s: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: B = None
        self.y: F = None
        self.x: D = None
        self.p: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: D = None
        self.w: E = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: D = None
        self.s: D = None
        self.o: D = None
        self.p: B = None
        self.r: C = None
        self.v: D = None
        self.txt = txt

m = A("m")
h = B("h")
g = C("g")
i = D("i")
f = E("f")
d = F("d")
a = G("a")
l = B("l")
j = D("j")

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: B = None
        self.y: F = None
        self.x: D = None
        self.p: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: D = None
        self.w: E = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: D = None
        self.s: D = None
        self.o: D = None
        self.p: B = None
        self.r: C = None
        self.v: D = None
        self.txt = txt

m = A("m")
h = B("h")
g = C("g")
i = D("i")
f = E("f")
d = F("d")
a = G("a")
l = B("l")
j = D("j")

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