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

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

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

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

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

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

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

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

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

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

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

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

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

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

c.v = l
c.w = h
c.s = d
d.z = b
d.v = l
d.p = l
j.s = c
j.z = c
j.r = e
j.v = f
j.o = a
j.u = h
f.w = c
h.x = c
h.o = f
l.y = c
l.v = d
l.q = d
l.o = f
a.s = c
a.z = c
a.r = f
a.v = e
a.o = j
a.u = h
e.w = c
b.y = c
b.v = d
b.q = d
b.o = f
assert c.w.o.w.txt == "c"