class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: J = None
        self.s: J = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: D = None
        self.z: H = None
        self.w: J = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: F = None
        self.v: D = None
        self.u: F = None
        self.w: J = None
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: A = None
        self.u: G = None
        self.o: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: I = None
        self.x: I = None
        self.v: I = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: C = None
        self.u: E = None
        self.o: A = None
        self.x: B = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: B = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: C = None
        self.v: C = None
        self.x: D = None
        self.o: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: D = None
        self.z: H = None
        self.w: J = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: F = None
        self.v: D = None
        self.u: F = None
        self.w: J = None
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: A = None
        self.u: G = None
        self.o: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: I = None
        self.x: I = None
        self.v: I = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: C = None
        self.u: E = None
        self.o: A = None
        self.x: B = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: B = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: C = None
        self.v: C = None
        self.x: D = None
        self.o: D = None
        self.txt = txt

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

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