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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: H = None
        self.x: G = None
        self.v: A = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: G = None
        self.y: A = None
        self.o: G = None
        self.x: F = None
        self.u: D = None
        self.z: D = None
        self.w: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: H = None
        self.x: G = None
        self.v: A = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: G = None
        self.y: A = None
        self.o: G = None
        self.x: F = None
        self.u: D = None
        self.z: D = None
        self.w: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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