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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: F = None
        self.w: G = None
        self.z: B = None
        self.q: F = None
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: E = None
        self.y: F = None
        self.txt = txt

f = A("f")
a = B("a")
k = C("k")
e = D("e")
d = E("d")
h = F("h")
g = G("g")
i = E("i")
n = F("n")

f.v = a
f.y = d
f.r = h
f.z = n
f.p = k
f.x = k
f.q = k
a.o = k
a.x = k
a.r = g
a.u = g
a.w = g
a.q = d
k.r = e
e.v = g
e.w = g
e.u = h
e.q = h
e.z = a
e.p = k
d.z = e
d.q = i
d.s = a
h.v = f
h.o = g
h.z = g
h.s = d
h.y = n
h.x = i
g.x = h
g.p = d
g.y = n
i.z = e
i.q = d
i.s = a
n.v = f
n.o = g
n.z = g
n.s = d
n.x = d
n.y = h
assert k.r.w.p.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: E = None
        self.r: F = None
        self.z: F = None
        self.p: C = None
        self.x: C = None
        self.q: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: F = None
        self.w: G = None
        self.z: B = None
        self.q: F = None
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: E = None
        self.y: F = None
        self.txt = txt

f = A("f")
a = B("a")
k = C("k")
e = D("e")
d = E("d")
h = F("h")
g = G("g")
i = E("i")
n = F("n")

f.v = a
f.y = d
f.r = h
f.z = n
f.p = k
f.x = k
f.q = k
a.o = k
a.x = k
a.r = g
a.u = g
a.w = g
a.q = d
k.r = e
e.v = g
e.w = g
e.u = h
e.q = h
e.z = a
e.p = k
d.z = e
d.q = i
d.s = a
h.v = f
h.o = g
h.z = g
h.s = d
h.y = n
h.x = i
g.x = h
g.p = d
g.y = n
i.z = e
i.q = d
i.s = a
n.v = f
n.o = g
n.z = g
n.s = d
n.x = d
n.y = h
assert k.r.w.p.txt == "d"