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

class B:
    def __init__(self, txt: str):
        self.y: J = None
        self.o: I = None
        self.u: A = None
        self.p: D = None
        self.t: G = None
        self.r: C = None
        self.s: E = None
        self.z: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: J = None
        self.o: G = None
        self.u: H = None
        self.w: J = None
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: F = None
        self.w: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: E = None
        self.y: B = None
        self.p: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: J = None
        self.o: I = None
        self.u: A = None
        self.p: D = None
        self.t: G = None
        self.r: C = None
        self.s: E = None
        self.z: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: J = None
        self.o: G = None
        self.u: H = None
        self.w: J = None
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: F = None
        self.w: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: E = None
        self.y: B = None
        self.p: A = None
        self.txt = txt

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

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

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