class A:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: F = None
        self.u: G = None
        self.y: D = None
        self.v: H = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: A = None
        self.p: H = None
        self.o: H = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: B = None
        self.o: C = None
        self.p: C = None
        self.w: H = None
        self.t: C = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: D = None
        self.x: H = None
        self.r: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: G = None
        self.x: G = None
        self.z: I = None
        self.y: D = None
        self.o: A = None
        self.txt = txt

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

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

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

l.w = e
l.z = d
l.u = i
l.y = f
l.v = h
l.r = c
c.s = i
c.r = l
c.p = h
c.o = h
c.x = f
b.w = h
b.t = i
f.o = i
n.y = f
n.u = c
n.o = b
n.p = b
n.t = b
n.w = h
n.x = m
d.o = c
d.u = f
d.x = h
d.r = e
i.y = d
i.r = l
h.s = i
h.v = i
h.x = i
h.z = m
h.y = f
h.o = l
m.r = i
e.y = d
e.x = f
e.v = c
e.o = i
assert f.o.y.r.x.o.r.txt == "
class A:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: F = None
        self.u: G = None
        self.y: D = None
        self.v: H = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: A = None
        self.p: H = None
        self.o: H = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: B = None
        self.o: C = None
        self.p: C = None
        self.w: H = None
        self.t: C = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: D = None
        self.x: H = None
        self.r: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: G = None
        self.x: G = None
        self.z: I = None
        self.y: D = None
        self.o: A = None
        self.txt = txt

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

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

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

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