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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: A = None
        self.p: B = None
        self.y: E = None
        self.v: A = None
        self.w: C = None
        self.r: D = None
        self.txt = txt

j = A("j")
l = B("l")
n = C("n")
f = D("f")
k = E("k")
b = F("b")
h = G("h")
g = C("g")
m = F("m")

j.v = m
l.r = f
l.z = h
l.s = j
l.t = j
l.p = m
n.q = b
n.w = h
f.z = l
k.x = m
k.s = l
b.s = j
b.y = k
b.p = f
h.z = g
h.w = g
h.s = j
h.v = j
h.p = l
h.y = k
h.r = f
g.q = m
g.w = h
m.s = j
m.y = k
m.p = f
assert h.s.v.y.s.r.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: A = None
        self.p: B = None
        self.y: E = None
        self.v: A = None
        self.w: C = None
        self.r: D = None
        self.txt = txt

j = A("j")
l = B("l")
n = C("n")
f = D("f")
k = E("k")
b = F("b")
h = G("h")
g = C("g")
m = F("m")

j.v = m
l.r = f
l.z = h
l.s = j
l.t = j
l.p = m
n.q = b
n.w = h
f.z = l
k.x = m
k.s = l
b.s = j
b.y = k
b.p = f
h.z = g
h.w = g
h.s = j
h.v = j
h.p = l
h.y = k
h.r = f
g.q = m
g.w = h
m.s = j
m.y = k
m.p = f
assert h.s.v.y.s.r.z.z.txt == "h"