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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: D = None
        self.y: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: F = None
        self.w: C = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: D = None
        self.y: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: F = None
        self.w: C = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

i.v = c
i.z = c
i.u = c
i.x = e
i.o = e
i.s = f
j.s = h
j.o = b
j.y = n
f.s = j
f.u = c
f.w = m
f.p = e
b.x = n
h.o = f
h.t = b
c.q = b
e.v = c
e.z = c
e.u = c
e.x = i
e.o = i
e.s = m
m.s = n
m.u = c
m.w = f
m.p = i
n.s = h
n.o = b
n.y = j
g.s = h
g.o = b
g.y = j
assert g.s.t.x.txt == "n"