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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: C = None
        self.w: G = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: C = None
        self.w: G = None
        self.y: E = None
        self.txt = txt

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

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

l.o = d
l.u = b
l.s = j
l.v = m
l.x = a
l.w = e
m.y = b
m.o = b
m.v = l
m.z = g
m.s = h
g.x = b
k.r = l
k.w = l
e.s = h
e.t = g
a.q = l
a.t = d
a.w = h
a.y = e
h.q = l
j.s = h
j.t = g
b.r = l
b.w = l
d.x = k
assert m.y.r.s.s.q.s.t.x.r.txt == "l"