class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: F = None
        self.p: C = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: E = None
        self.p: G = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: C = None
        self.x: A = None
        self.s: G = None
        self.u: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: C = None
        self.x: C = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: E = None
        self.p: G = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: C = None
        self.x: A = None
        self.s: G = None
        self.u: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: C = None
        self.x: C = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: D = None
        self.txt = txt

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

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