class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: G = None
        self.x: D = None
        self.y: I = None
        self.w: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: G = None
        self.q: H = None
        self.y: B = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: B = None
        self.z: F = None
        self.t: H = None
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: A = None
        self.t: A = None
        self.w: H = None
        self.x: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: F = None
        self.r: D = None
        self.y: B = None
        self.o: G = None
        self.w: D = None
        self.txt = txt

c = A("c")
l = B("l")
f = C("f")
g = D("g")
n = E("n")
i = F("i")
d = G("d")
j = H("j")
h = I("h")
a = F("a")

c.v = d
c.r = d
c.x = g
c.y = h
c.w = h
l.t = d
l.r = d
l.w = g
l.z = g
l.s = h
l.x = c
l.u = c
f.s = h
f.w = d
f.q = j
f.t = j
f.y = l
g.y = j
g.t = j
g.u = l
g.z = a
g.w = c
n.w = i
n.x = g
i.y = n
i.z = c
i.t = c
i.w = j
i.x = f
d.r = l
j.u = h
j.v = d
j.o = c
j.x = l
j.t = l
j.r = a
j.w = n
h.q = c
h.t = i
h.r = g
h.w = g
h.y = l
h.o = d
a.y = n
a.z = c
a.t = c
a.w = j
a.x = f
assert j.r.z.x.u.z.w.r.txt == "
class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: G = None
        self.x: D = None
        self.y: I = None
        self.w: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: G = None
        self.q: H = None
        self.y: B = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: B = None
        self.z: F = None
        self.t: H = None
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: A = None
        self.t: A = None
        self.w: H = None
        self.x: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: F = None
        self.r: D = None
        self.y: B = None
        self.o: G = None
        self.w: D = None
        self.txt = txt

c = A("c")
l = B("l")
f = C("f")
g = D("g")
n = E("n")
i = F("i")
d = G("d")
j = H("j")
h = I("h")
a = F("a")

c.v = d
c.r = d
c.x = g
c.y = h
c.w = h
l.t = d
l.r = d
l.w = g
l.z = g
l.s = h
l.x = c
l.u = c
f.s = h
f.w = d
f.q = j
f.t = j
f.y = l
g.y = j
g.t = j
g.u = l
g.z = a
g.w = c
n.w = i
n.x = g
i.y = n
i.z = c
i.t = c
i.w = j
i.x = f
d.r = l
j.u = h
j.v = d
j.o = c
j.x = l
j.t = l
j.r = a
j.w = n
h.q = c
h.t = i
h.r = g
h.w = g
h.y = l
h.o = d
a.y = n
a.z = c
a.t = c
a.w = j
a.x = f
assert j.r.z.x.u.z.w.r.txt == "d"