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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: E = None
        self.z: D = None
        self.r: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: E = None
        self.z: D = None
        self.r: C = None
        self.txt = txt

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

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