class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: D = None
        self.p: D = None
        self.s: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: H = None
        self.p: B = None
        self.z: A = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: C = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: C = None
        self.v: F = None
        self.z: F = None
        self.r: G = None
        self.s: A = None
        self.q: C = None
        self.u: I = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: H = None
        self.p: B = None
        self.z: A = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: C = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: C = None
        self.v: F = None
        self.z: F = None
        self.r: G = None
        self.s: A = None
        self.q: C = None
        self.u: I = None
        self.y: F = None
        self.txt = txt

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

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

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