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

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

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

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

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

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

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

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

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

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

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

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

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

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

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