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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: E = None
        self.t: D = None
        self.s: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: B = None
        self.v: F = None
        self.z: D = None
        self.y: H = None
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: E = None
        self.t: D = None
        self.s: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: B = None
        self.v: F = None
        self.z: D = None
        self.y: H = None
        self.o: G = None
        self.txt = txt

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

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