class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: C = None
        self.x: G = None
        self.p: C = None
        self.r: A = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: E = None
        self.o: F = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: E = None
        self.y: G = None
        self.q: G = None
        self.txt = txt

f = A("f")
h = B("h")
a = C("a")
e = D("e")
c = E("c")
b = F("b")
l = G("l")
i = H("i")
j = A("j")

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: E = None
        self.o: F = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: E = None
        self.y: G = None
        self.q: G = None
        self.txt = txt

f = A("f")
h = B("h")
a = C("a")
e = D("e")
c = E("c")
b = F("b")
l = G("l")
i = H("i")
j = A("j")

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