class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: F = None
        self.p: B = None
        self.w: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: F = None
        self.q: D = None
        self.r: F = None
        self.y: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: F = None
        self.q: D = None
        self.r: F = None
        self.y: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: B = None
        self.txt = txt

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

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