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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: F = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: F = None
        self.r: C = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: G = None
        self.y: B = None
        self.p: C = None
        self.txt = txt

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

k = A("k")
n = B("n")
e = C("e")
a = D("a")
h = E("h")
f = F("f")
i = G("i")
d = A("d")
c = D("c")

k.u = n
k.y = n
k.v = e
k.w = e
k.o = h
k.r = h
k.s = i
n.s = f
e.q = i
a.y = c
a.p = f
a.q = e
h.o = n
h.v = f
h.r = e
h.s = e
f.x = n
f.y = n
f.w = i
f.p = e
i.u = n
i.y = n
i.o = h
d.u = n
d.y = n
d.v = e
d.w = e
d.o = h
d.r = h
d.s = i
c.y = a
c.p = f
c.q = e
assert a.p.x.s.p.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: B = None
        self.v: C = None
        self.w: C = None
        self.o: E = None
        self.s: G = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: F = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: F = None
        self.r: C = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: G = None
        self.y: B = None
        self.p: C = None
        self.txt = txt

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

k = A("k")
n = B("n")
e = C("e")
a = D("a")
h = E("h")
f = F("f")
i = G("i")
d = A("d")
c = D("c")

k.u = n
k.y = n
k.v = e
k.w = e
k.o = h
k.r = h
k.s = i
n.s = f
e.q = i
a.y = c
a.p = f
a.q = e
h.o = n
h.v = f
h.r = e
h.s = e
f.x = n
f.y = n
f.w = i
f.p = e
i.u = n
i.y = n
i.o = h
d.u = n
d.y = n
d.v = e
d.w = e
d.o = h
d.r = h
d.s = i
c.y = a
c.p = f
c.q = e
assert a.p.x.s.p.txt == "e"