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

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: I = None
        self.y: A = None
        self.r: D = None
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: I = None
        self.x: A = None
        self.t: A = None
        self.p: H = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: I = None
        self.y: A = None
        self.r: D = None
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: I = None
        self.x: A = None
        self.t: A = None
        self.p: H = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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

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

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