class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: F = None
        self.y: B = None
        self.s: C = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: B = None
        self.w: C = None
        self.x: G = None
        self.z: D = None
        self.s: C = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: B = None
        self.s: C = None
        self.w: E = None
        self.x: B = None
        self.o: C = None
        self.txt = txt

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

l = A("l")
j = B("j")
g = C("g")
b = D("b")
f = E("f")
m = F("m")
k = G("k")
e = D("e")
d = C("d")
i = E("i")

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: B = None
        self.w: C = None
        self.x: G = None
        self.z: D = None
        self.s: C = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: B = None
        self.s: C = None
        self.w: E = None
        self.x: B = None
        self.o: C = None
        self.txt = txt

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

l = A("l")
j = B("j")
g = C("g")
b = D("b")
f = E("f")
m = F("m")
k = G("k")
e = D("e")
d = C("d")
i = E("i")

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