class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: B = None
        self.u: D = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: F = None
        self.w: A = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: B = None
        self.u: A = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: F = None
        self.u: F = None
        self.z: B = None
        self.p: D = None
        self.y: A = None
        self.txt = txt

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

h = A("h")
j = B("j")
a = C("a")
b = D("b")
l = E("l")
c = F("c")
k = D("k")

h.v = a
h.s = a
h.t = j
h.u = b
j.z = b
j.r = b
j.u = c
j.w = h
a.v = j
b.q = j
b.s = j
b.u = h
b.z = l
l.r = j
l.z = j
l.t = c
l.u = c
l.p = k
l.y = h
c.o = h
c.z = h
c.p = b
c.r = b
c.w = b
k.q = j
k.s = j
k.u = h
k.z = l
assert j.w.v.v.u.o.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: B = None
        self.u: D = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: F = None
        self.w: A = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: B = None
        self.u: A = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: F = None
        self.u: F = None
        self.z: B = None
        self.p: D = None
        self.y: A = None
        self.txt = txt

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

h = A("h")
j = B("j")
a = C("a")
b = D("b")
l = E("l")
c = F("c")
k = D("k")

h.v = a
h.s = a
h.t = j
h.u = b
j.z = b
j.r = b
j.u = c
j.w = h
a.v = j
b.q = j
b.s = j
b.u = h
b.z = l
l.r = j
l.z = j
l.t = c
l.u = c
l.p = k
l.y = h
c.o = h
c.z = h
c.p = b
c.r = b
c.w = b
k.q = j
k.s = j
k.u = h
k.z = l
assert j.w.v.v.u.o.s.v.txt == "j"