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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: B = None
        self.y: E = None
        self.w: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: G = None
        self.z: A = None
        self.v: D = None
        self.s: B = None
        self.y: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: B = None
        self.y: E = None
        self.w: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: G = None
        self.z: A = None
        self.v: D = None
        self.s: B = None
        self.y: C = None
        self.txt = txt

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

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