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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: G = None
        self.v: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: H = None
        self.q: B = None
        self.x: C = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: G = None
        self.v: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: H = None
        self.q: B = None
        self.x: C = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

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