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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: D = None
        self.x: B = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: C = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: B = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: B = None
        self.p: D = None
        self.txt = txt

f = A("f")
h = B("h")
d = C("d")
c = D("c")
l = E("l")
j = F("j")
a = G("a")

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: D = None
        self.x: B = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: C = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: B = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: B = None
        self.p: D = None
        self.txt = txt

f = A("f")
h = B("h")
d = C("d")
c = D("c")
l = E("l")
j = F("j")
a = G("a")

f.p = l
f.o = l
f.v = a
f.z = c
f.t = c
h.z = l
h.u = l
h.o = c
h.v = a
h.s = d
d.v = l
d.r = c
d.x = h
d.q = h
c.w = d
c.z = d
c.q = h
l.w = c
l.o = c
l.t = h
j.v = l
a.s = c
a.p = c
a.z = h
assert c.w.r.w.r.w.v.t.txt == "h"