class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: F = None
        self.s: I = None
        self.v: G = None
        self.w: G = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: C = None
        self.q: G = None
        self.z: E = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: D = None
        self.v: I = None
        self.w: G = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: C = None
        self.v: E = None
        self.t: H = None
        self.u: H = None
        self.s: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: B = None
        self.u: E = None
        self.o: H = None
        self.t: A = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: E = None
        self.p: D = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: A = None
        self.t: C = None
        self.o: C = None
        self.y: A = None
        self.p: F = None
        self.txt = txt

l = A("l")
a = B("a")
i = C("i")
j = D("j")
m = E("m")
e = F("e")
f = G("f")
b = H("b")
g = I("g")

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: C = None
        self.q: G = None
        self.z: E = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: D = None
        self.v: I = None
        self.w: G = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: C = None
        self.v: E = None
        self.t: H = None
        self.u: H = None
        self.s: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: B = None
        self.u: E = None
        self.o: H = None
        self.t: A = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: E = None
        self.p: D = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: A = None
        self.t: C = None
        self.o: C = None
        self.y: A = None
        self.p: F = None
        self.txt = txt

l = A("l")
a = B("a")
i = C("i")
j = D("j")
m = E("m")
e = F("e")
f = G("f")
b = H("b")
g = I("g")

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