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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: C = None
        self.txt = txt

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

n = A("n")
b = B("b")
j = C("j")
e = D("e")
h = E("h")
c = F("c")
k = C("k")
i = A("i")
d = C("d")
a = F("a")

n.s = i
n.v = i
n.x = b
n.t = h
b.y = a
j.q = i
e.q = a
e.s = a
e.z = k
h.r = k
h.u = k
c.w = a
c.x = d
k.q = i
i.s = n
i.v = n
i.x = b
i.t = h
d.q = i
a.w = c
a.x = j
assert h.u.q.v.s.x.txt == "
class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: B = None
        self.v: A = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: C = None
        self.txt = txt

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

n = A("n")
b = B("b")
j = C("j")
e = D("e")
h = E("h")
c = F("c")
k = C("k")
i = A("i")
d = C("d")
a = F("a")

n.s = i
n.v = i
n.x = b
n.t = h
b.y = a
j.q = i
e.q = a
e.s = a
e.z = k
h.r = k
h.u = k
c.w = a
c.x = d
k.q = i
i.s = n
i.v = n
i.x = b
i.t = h
d.q = i
a.w = c
a.x = j
assert h.u.q.v.s.x.txt == "b"