class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: E = None
        self.y: F = None
        self.x: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: E = None
        self.u: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: A = None
        self.o: D = None
        self.q: A = None
        self.s: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: B = None
        self.q: A = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: E = None
        self.u: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: A = None
        self.o: D = None
        self.q: A = None
        self.s: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: B = None
        self.q: A = None
        self.s: E = None
        self.txt = txt

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

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