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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: C = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: F = None
        self.x: A = None
        self.r: F = None
        self.s: D = None
        self.w: E = None
        self.y: F = None
        self.txt = txt

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

d.v = k
d.y = m
d.t = n
i.y = c
a.t = f
a.v = n
a.r = k
a.p = m
a.x = c
n.s = a
c.x = f
c.p = a
c.u = k
k.x = i
k.z = i
k.q = f
h.q = a
h.t = k
h.r = k
h.y = k
h.x = f
h.s = n
h.w = c
f.v = k
f.y = a
f.t = n
m.t = f
m.v = n
m.r = k
m.p = a
m.x = c
assert c.p.x.p.r.q.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: C = None
        self.t: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: C = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: F = None
        self.x: A = None
        self.r: F = None
        self.s: D = None
        self.w: E = None
        self.y: F = None
        self.txt = txt

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

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