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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: A = None
        self.t: B = None
        self.v: B = None
        self.y: B = None
        self.s: D = None
        self.txt = txt

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

n = A("n")
e = B("e")
l = C("l")
f = D("f")
d = E("d")
h = F("h")
j = G("j")
g = F("g")
k = B("k")
a = E("a")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: A = None
        self.t: B = None
        self.v: B = None
        self.y: B = None
        self.s: D = None
        self.txt = txt

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

n = A("n")
e = B("e")
l = C("l")
f = D("f")
d = E("d")
h = F("h")
j = G("j")
g = F("g")
k = B("k")
a = E("a")

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