class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: E = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: E = None
        self.w: A = None
        self.r: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: A = None
        self.r: B = None
        self.q: F = None
        self.o: D = None
        self.s: A = None
        self.x: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: E = None
        self.w: A = None
        self.r: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: A = None
        self.r: B = None
        self.q: F = None
        self.o: D = None
        self.s: A = None
        self.x: E = None
        self.txt = txt

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

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

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