class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: B = None
        self.u: F = None
        self.x: E = None
        self.y: F = None
        self.p: D = None
        self.v: 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.p: D = None
        self.y: F = None
        self.r: D = None
        self.s: D = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: B = None
        self.q: G = None
        self.x: G = None
        self.y: E = None
        self.w: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: E = None
        self.t: C = None
        self.r: G = None
        self.u: A = None
        self.p: A = None
        self.txt = txt

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

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

m.t = h
m.q = n
m.u = j
m.y = j
m.x = g
m.v = g
m.p = e
n.s = j
k.p = e
k.r = e
k.s = e
k.q = e
k.y = j
e.p = h
e.q = h
e.x = h
e.w = h
e.o = n
e.y = g
g.s = m
g.t = j
j.w = e
j.v = g
j.t = k
j.r = h
j.u = m
j.p = m
h.x = j
h.t = m
i.s = j
assert j.t.y.p.q.s.p.txt == "
class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: B = None
        self.u: F = None
        self.x: E = None
        self.y: F = None
        self.p: D = None
        self.v: 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.p: D = None
        self.y: F = None
        self.r: D = None
        self.s: D = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: B = None
        self.q: G = None
        self.x: G = None
        self.y: E = None
        self.w: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: E = None
        self.t: C = None
        self.r: G = None
        self.u: A = None
        self.p: A = None
        self.txt = txt

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

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

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