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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: C = None
        self.o: D = None
        self.p: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: B = None
        self.y: D = None
        self.s: E = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: A = None
        self.o: D = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: B = None
        self.z: C = None
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: C = None
        self.o: D = None
        self.p: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: B = None
        self.y: D = None
        self.s: E = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: A = None
        self.o: D = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: B = None
        self.z: C = None
        self.u: F = None
        self.txt = txt

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

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