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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: F = None
        self.z: G = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: B = None
        self.s: E = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: C = None
        self.t: A = None
        self.txt = txt

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

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

h = A("h")
n = B("n")
k = C("k")
g = D("g")
d = E("d")
j = F("j")
b = G("b")
l = C("l")
i = A("i")

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: F = None
        self.z: G = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: B = None
        self.s: E = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: C = None
        self.t: A = None
        self.txt = txt

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

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

h = A("h")
n = B("n")
k = C("k")
g = D("g")
d = E("d")
j = F("j")
b = G("b")
l = C("l")
i = A("i")

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