class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: A = None
        self.t: A = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: F = None
        self.q: A = None
        self.x: E = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: E = None
        self.x: C = None
        self.v: G = None
        self.o: B = None
        self.y: D = None
        self.u: B = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: H = None
        self.o: A = None
        self.w: A = None
        self.p: B = None
        self.t: C = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: G = None
        self.t: E = None
        self.v: B = None
        self.z: A = None
        self.q: A = None
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: A = None
        self.t: A = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: F = None
        self.q: A = None
        self.x: E = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: E = None
        self.x: C = None
        self.v: G = None
        self.o: B = None
        self.y: D = None
        self.u: B = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: H = None
        self.o: A = None
        self.w: A = None
        self.p: B = None
        self.t: C = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: G = None
        self.t: E = None
        self.v: B = None
        self.z: A = None
        self.q: A = None
        self.x: A = None
        self.txt = txt

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

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