class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: G = None
        self.p: F = None
        self.v: B = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: B = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: G = None
        self.z: G = None
        self.txt = txt

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

c = A("c")
n = B("n")
e = C("e")
h = D("h")
j = E("j")
l = F("l")
b = G("b")
a = G("a")
m = A("m")

c.x = h
n.w = e
n.u = l
e.t = j
e.o = j
e.x = a
e.p = l
e.v = n
h.p = e
h.t = b
h.s = j
j.r = b
j.x = n
j.z = n
l.q = n
l.t = a
l.z = b
b.t = n
b.s = e
b.v = e
b.o = l
a.t = n
a.s = e
a.v = e
a.o = l
m.x = h
assert m.x.s.z.w.t.r.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: G = None
        self.p: F = None
        self.v: B = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: B = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: G = None
        self.z: G = None
        self.txt = txt

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

c = A("c")
n = B("n")
e = C("e")
h = D("h")
j = E("j")
l = F("l")
b = G("b")
a = G("a")
m = A("m")

c.x = h
n.w = e
n.u = l
e.t = j
e.o = j
e.x = a
e.p = l
e.v = n
h.p = e
h.t = b
h.s = j
j.r = b
j.x = n
j.z = n
l.q = n
l.t = a
l.z = b
b.t = n
b.s = e
b.v = e
b.o = l
a.t = n
a.s = e
a.v = e
a.o = l
m.x = h
assert m.x.s.z.w.t.r.v.x.txt == "a"