class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: E = None
        self.x: F = None
        self.p: E = None
        self.v: C = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: F = None
        self.y: B = None
        self.u: B = None
        self.z: B = None
        self.q: F = None
        self.p: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: D = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: B = None
        self.s: C = None
        self.x: G = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: C = None
        self.u: E = None
        self.w: A = None
        self.y: D = None
        self.v: B = None
        self.s: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: F = None
        self.y: B = None
        self.u: B = None
        self.z: B = None
        self.q: F = None
        self.p: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: D = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: B = None
        self.s: C = None
        self.x: G = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: C = None
        self.u: E = None
        self.w: A = None
        self.y: D = None
        self.v: B = None
        self.s: B = None
        self.txt = txt

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

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