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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: A = None
        self.s: A = None
        self.t: E = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: A = None
        self.s: A = None
        self.t: E = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

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