class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: I = None
        self.u: H = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: C = None
        self.v: C = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: D = None
        self.t: F = None
        self.r: J = None
        self.x: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: C = None
        self.v: C = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: D = None
        self.t: F = None
        self.r: J = None
        self.x: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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