class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: G = None
        self.q: C = None
        self.x: C = None
        self.p: F = None
        self.w: H = None
        self.v: I = None
        self.r: B = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: D = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: H = None
        self.t: A = None
        self.w: A = None
        self.r: H = None
        self.p: J = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: F = None
        self.w: F = None
        self.x: F = None
        self.v: E = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: D = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: H = None
        self.t: A = None
        self.w: A = None
        self.r: H = None
        self.p: J = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: F = None
        self.w: F = None
        self.x: F = None
        self.v: E = None
        self.u: D = None
        self.txt = txt

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

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