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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: C = None
        self.z: G = None
        self.o: D = None
        self.s: F = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: C = None
        self.y: C = None
        self.p: C = None
        self.q: C = None
        self.z: B = None
        self.t: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: B = None
        self.v: B = None
        self.z: C = None
        self.y: F = None
        self.q: B = None
        self.p: E = None
        self.txt = txt

k = A("k")
i = B("i")
h = C("h")
m = D("m")
e = E("e")
n = F("n")
g = G("g")

k.r = i
k.x = m
k.s = m
k.q = g
k.y = g
k.o = n
i.u = h
i.x = h
i.z = g
i.w = g
i.o = m
i.s = n
h.t = e
h.w = k
h.y = g
m.x = i
m.z = i
m.s = h
m.y = h
m.p = h
m.q = h
m.t = n
e.u = g
n.y = m
g.t = i
g.w = i
g.v = i
g.q = i
g.z = h
g.y = n
g.p = e
assert e.u.y.y.y.t.u.p.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: D = None
        self.s: D = None
        self.q: G = None
        self.o: F = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: C = None
        self.z: G = None
        self.o: D = None
        self.s: F = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: C = None
        self.y: C = None
        self.p: C = None
        self.q: C = None
        self.z: B = None
        self.t: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: B = None
        self.v: B = None
        self.z: C = None
        self.y: F = None
        self.q: B = None
        self.p: E = None
        self.txt = txt

k = A("k")
i = B("i")
h = C("h")
m = D("m")
e = E("e")
n = F("n")
g = G("g")

k.r = i
k.x = m
k.s = m
k.q = g
k.y = g
k.o = n
i.u = h
i.x = h
i.z = g
i.w = g
i.o = m
i.s = n
h.t = e
h.w = k
h.y = g
m.x = i
m.z = i
m.s = h
m.y = h
m.p = h
m.q = h
m.t = n
e.u = g
n.y = m
g.t = i
g.w = i
g.v = i
g.q = i
g.z = h
g.y = n
g.p = e
assert e.u.y.y.y.t.u.p.txt == "e"