class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: H = None
        self.x: I = None
        self.t: H = None
        self.u: C = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: C = None
        self.t: C = None
        self.o: E = None
        self.w: J = None
        self.y: J = None
        self.q: G = None
        self.z: G = None
        self.u: J = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: E = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: F = None
        self.s: F = None
        self.u: D = None
        self.v: B = None
        self.r: D = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: G = None
        self.r: E = None
        self.w: G = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: C = None
        self.t: C = None
        self.o: E = None
        self.w: J = None
        self.y: J = None
        self.q: G = None
        self.z: G = None
        self.u: J = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: E = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: F = None
        self.s: F = None
        self.u: D = None
        self.v: B = None
        self.r: D = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: G = None
        self.r: E = None
        self.w: G = None
        self.v: F = None
        self.txt = txt

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

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