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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: D = None
        self.w: D = None
        self.t: A = None
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: E = None
        self.q: E = None
        self.x: C = None
        self.p: E = None
        self.txt = txt

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

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

i = A("i")
l = B("l")
h = C("h")
d = D("d")
j = E("j")
n = F("n")
b = F("b")

i.v = l
i.q = n
i.y = n
i.r = d
i.u = d
l.o = h
l.q = d
l.w = d
l.t = i
l.x = i
h.z = i
h.p = i
h.u = j
h.o = l
h.q = n
d.z = i
d.s = j
d.q = j
d.p = j
d.x = h
j.o = d
n.p = j
n.x = j
n.o = j
b.p = j
b.x = j
b.o = j
assert l.w.s.o.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: F = None
        self.r: D = None
        self.u: D = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: D = None
        self.w: D = None
        self.t: A = None
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: E = None
        self.q: E = None
        self.x: C = None
        self.p: E = None
        self.txt = txt

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

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

i = A("i")
l = B("l")
h = C("h")
d = D("d")
j = E("j")
n = F("n")
b = F("b")

i.v = l
i.q = n
i.y = n
i.r = d
i.u = d
l.o = h
l.q = d
l.w = d
l.t = i
l.x = i
h.z = i
h.p = i
h.u = j
h.o = l
h.q = n
d.z = i
d.s = j
d.q = j
d.p = j
d.x = h
j.o = d
n.p = j
n.x = j
n.o = j
b.p = j
b.x = j
b.o = j
assert l.w.s.o.z.txt == "i"