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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: C = None
        self.z: A = None
        self.p: C = None
        self.q: B = None
        self.s: B = None
        self.o: A = None
        self.y: F = None
        self.txt = txt

f = A("f")
g = B("g")
c = C("c")
e = D("e")
l = E("l")
d = F("d")
i = G("i")
k = H("k")
n = B("n")

f.t = i
f.y = c
f.p = d
g.s = n
g.y = n
g.p = c
g.v = l
g.u = f
c.w = k
e.t = i
e.z = l
l.p = i
l.u = g
l.v = d
d.y = k
i.w = d
i.u = n
i.r = c
k.x = c
k.u = c
k.p = c
k.z = f
k.o = f
k.q = n
k.s = n
k.y = d
n.s = g
n.y = g
n.p = c
n.v = l
n.u = f
assert n.s.v.p.r.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: C = None
        self.p: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: C = None
        self.z: A = None
        self.p: C = None
        self.q: B = None
        self.s: B = None
        self.o: A = None
        self.y: F = None
        self.txt = txt

f = A("f")
g = B("g")
c = C("c")
e = D("e")
l = E("l")
d = F("d")
i = G("i")
k = H("k")
n = B("n")

f.t = i
f.y = c
f.p = d
g.s = n
g.y = n
g.p = c
g.v = l
g.u = f
c.w = k
e.t = i
e.z = l
l.p = i
l.u = g
l.v = d
d.y = k
i.w = d
i.u = n
i.r = c
k.x = c
k.u = c
k.p = c
k.z = f
k.o = f
k.q = n
k.s = n
k.y = d
n.s = g
n.y = g
n.p = c
n.v = l
n.u = f
assert n.s.v.p.r.w.txt == "k"