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

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

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: F = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.t: G = None
        self.y: I = None
        self.s: F = None
        self.u: C = None
        self.x: F = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: G = None
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: A = None
        self.t: E = None
        self.q: J = None
        self.u: D = None
        self.y: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: A = None
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: D = None
        self.txt = txt

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

c.z = l
c.w = n
k.v = n
k.y = l
k.x = c
l.r = m
l.v = h
n.u = b
n.x = e
n.p = h
a.w = m
a.t = b
a.y = h
a.s = e
a.x = e
a.r = e
a.u = l
e.z = n
e.r = b
e.t = m
b.r = e
b.p = c
b.y = c
b.t = a
b.q = m
b.u = n
g.x = b
g.y = n
g.w = n
g.z = c
g.r = l
g.t = h
g.q = a
g.v = a
h.p = n
h.u = c
h.x = e
m.u = c
m.p = n
assert g.w.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: F = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.t: G = None
        self.y: I = None
        self.s: F = None
        self.u: C = None
        self.x: F = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: G = None
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: A = None
        self.t: E = None
        self.q: J = None
        self.u: D = None
        self.y: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: A = None
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: D = None
        self.txt = txt

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

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