class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: G = None
        self.x: E = None
        self.t: F = None
        self.y: E = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: A = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: E = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: A = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: E = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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