class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: F = None
        self.y: E = None
        self.t: I = None
        self.v: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: A = None
        self.p: F = None
        self.u: F = None
        self.s: B = None
        self.z: A = None
        self.o: D = None
        self.q: I = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: I = None
        self.o: B = None
        self.v: F = None
        self.t: F = None
        self.s: F = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: A = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: D = None
        self.s: B = None
        self.r: F = None
        self.x: E = None
        self.o: C = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: G = None
        self.txt = txt

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

d = A("d")
e = B("e")
n = C("n")
a = D("a")
i = E("i")
g = F("g")
h = G("h")
m = H("m")
j = I("j")
b = B("b")

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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: A = None
        self.p: F = None
        self.u: F = None
        self.s: B = None
        self.z: A = None
        self.o: D = None
        self.q: I = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: I = None
        self.o: B = None
        self.v: F = None
        self.t: F = None
        self.s: F = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: A = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: D = None
        self.s: B = None
        self.r: F = None
        self.x: E = None
        self.o: C = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: G = None
        self.txt = txt

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

d = A("d")
e = B("e")
n = C("n")
a = D("a")
i = E("i")
g = F("g")
h = G("h")
m = H("m")
j = I("j")
b = B("b")

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